import React, {Component} from "react";
import Cell from "./Cell";
//行
export default class Row extends Component {
    playChess(row, col) {
        this.props.playChess(row, col)
    }

    render() {
        const {rowData, row} = this.props

        return (
            <div className="row-container">
                {
                    rowData.map((item, index) => (
                        <Cell key={index} data={item} row={row} col={index} playChess={this.playChess.bind(this)}/>
                    ))
                }
            </div>
        )
    }
}
